home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
usenet
/
sources
/
volume90
/
comm
/
vt10029a
/
part02
/
2.9-2.9A
Wrap
Text File
|
1990-02-24
|
53KB
|
1,840 lines
Enclosed are the patches to bring version 2.9 of VT100 up to version 2.9A.
These patches are context diffs which may be applied by hand or by using
* patch version 2.0 available from Fish disk # 129 or
* patch version 2.0.1.6 (patchlevel 12) available from Fish disk # 296.
If you use one of the patch programs, make a copy of your current VT100
source (fopr safekeeping), CD to the directory containing the source and
say:
patch < 2.9-2.9A
where "2.9-2.9A" is the name of this file.
These patches fix a number of problems, some of them relatively serious
so I encourage you to apply them as soon as possible. These patches also
provide a new command STRIP ON/OFF and an equivalent menu option under the
Parity menu. STRIP will discard parity from data from your host which is
destined for your terminal. If full-screen editors don't work from your
host (e.g. you're seeing funny things like [0;0H). then try STRIP.
If you encounter any problems with VT100, please send e-mail to me.
--
Tony Sumrall author of VT100 2.9 (and 2.8a and 2.8 and...)
acs@pccuts.pcc.amdahl.com -or- amdahl!pccuts!acs
Index: vt100.h
Prereq: 891003)
*** ./vt100.h Tue Feb 13 09:54:54 1990
--- ../2.9A/vt100.h Tue Feb 13 09:55:08 1990
***************
*** 1,7 ****
--- 1,22 ----
+ #define HRCSID "$RCSfile: vt100.h,v $ $Revision: 1.4 $"
+
/*********************************************************************
* a terminal program that has ascii and xmodem transfer capability
* :ts=8
*
+ * $Log: vt100.h,v $
+ * Revision 1.4 90/02/12 20:23:52 acs
+ * 1) Update date stamp in VERSION for the release of 2.9A.
+ * 2) define HRCSID instead of declaring it static char.
+ *
+ * Revision 1.3 89/12/19 20:39:14 acs
+ * Updated version and date stamp.
+ *
+ * Revision 1.2 89/11/06 20:58:52 acs
+ * 1) Support for new STRIP command and menu option.
+ * 2) New window title (date change).
+ * 3) Add RCS id and change log.
+ *
* v2.9 ACS - See change summary.
* v2.8a 880331 ACS - Update title to 2.8A.
* v2.7 870825 ACS - See README.
***************
*** 23,29 ****
********************************************************************/
/********* major version (used for title of terminal window) *********/
! #define VERSION "VT100 (V2.9 ACS 891003) Terminal Window"
/*********** ######## define the compiler type here ######## ********/
#define LATTICE 0
--- 38,44 ----
********************************************************************/
/********* major version (used for title of terminal window) *********/
! #define VERSION "VT100 (V2.9A ACS 900212) Terminal Window"
/*********** ######## define the compiler type here ######## ********/
#define LATTICE 0
***************
*** 100,106 ****
#define EXTMAX 10 /* number of external xfer pgms allowed */
#define COMMAX 4 /* number of communication sub menus */
#define RSMAX 5 /* speed menu items */
! #define PARMAX 5 /* parity items */
#define XFMAX 4 /* transfer mode items */
#define SCRIPTMAX 3 /* script menu items */
#define UTILMAX 12 /* utility menu */
--- 115,121 ----
#define EXTMAX 10 /* number of external xfer pgms allowed */
#define COMMAX 4 /* number of communication sub menus */
#define RSMAX 5 /* speed menu items */
! #define PARMAX 7 /* parity items */
#define XFMAX 4 /* transfer mode items */
#define SCRIPTMAX 3 /* script menu items */
#define UTILMAX 12 /* utility menu */
***************
*** 264,270 ****
extern int p_foreground,p_background,p_bold,p_cursor,p_lines,p_mode;
extern int p_parity,p_volume,p_wrap,p_echo,p_keyapp,p_curapp,p_bs_del;
extern int p_xbeep, p_xproto, p_convert,p_autochop, p_kmaxpack, p_unit;
! extern int p_fontsize, p_shared, p_mouse_up, p_mouse_down;
extern char p_keyscript;
extern long p_break;
extern char *p_font, *p_device, *p_f[11],*p_F[10];
--- 279,285 ----
extern int p_foreground,p_background,p_bold,p_cursor,p_lines,p_mode;
extern int p_parity,p_volume,p_wrap,p_echo,p_keyapp,p_curapp,p_bs_del;
extern int p_xbeep, p_xproto, p_convert,p_autochop, p_kmaxpack, p_unit;
! extern int p_fontsize, p_shared, p_mouse_up, p_mouse_down, p_strip;
extern char p_keyscript;
extern long p_break;
extern char *p_font, *p_device, *p_f[11],*p_F[10];
***************
*** 325,332 ****
cmd_ac(), cmd_appcur(), cmd_baud(), cmd_bt(), cmd_conv(),
cmd_echo(), cmd_exit(), cmd_ext(), cmd_fnc(), cmd_key(),
cmd_kmode(), cmd_kmaxpk(), cmd_mode(), cmd_mouse(),
! cmd_numkey(), cmd_parity(), cmd_share(), cmd_short(),
! cmd_swap(), cmd_wrap(), cmd_xbeep(), cmd_xproto();
/* rexx-only commands */
extern int cmd_rx(), cmd_fwd();
--- 340,348 ----
cmd_ac(), cmd_appcur(), cmd_baud(), cmd_bt(), cmd_conv(),
cmd_echo(), cmd_exit(), cmd_ext(), cmd_fnc(), cmd_key(),
cmd_kmode(), cmd_kmaxpk(), cmd_mode(), cmd_mouse(),
! cmd_numkey(), cmd_parity(), cmd_strip(), cmd_share(),
! cmd_short(), cmd_swap(), cmd_wrap(), cmd_xbeep(),
! cmd_xproto();
/* rexx-only commands */
extern int cmd_rx(), cmd_fwd();
Index: expand.c
*** ./expand.c Tue Feb 13 09:54:48 1990
--- ../2.9A/expand.c Tue Feb 13 09:55:06 1990
***************
*** 1,7 ****
--- 1,13 ----
+ static char rcsid[] = "$RCSfile: expand.c,v $ $Revision: 1.2 $";
+
/*************************************************************
* vt100 terminal emulator - Wild card and Directory support
* :ts=8
*
+ * $Log: expand.c,v $
+ * Revision 1.2 89/12/19 20:38:41 acs
+ * Added RCS id and change log.
+ *
* v2.9 ACS - See change summary.
* v2.7 870825 ACS - Use the *InfoMsg*() routines in window.c rather
* than req().
Index: init.c
*** ./init.c Tue Feb 13 09:54:49 1990
--- ../2.9A/init.c Tue Feb 13 09:55:06 1990
***************
*** 1,7 ****
--- 1,27 ----
+ static char rcsid[] = "$RCSfile: init.c,v $ $Revision: 1.4 $";
+
/***************************************************************
* vt100 - terminal emulator - initialization
* :ts=8
*
+ * $Log: init.c,v $
+ * Revision 1.4 89/12/12 22:13:56 acs
+ * 1) Strip excess blanks from the rest of the menu items.
+ * 2) No checkmark on "---" parity item (ParItem[5]).
+ *
+ * Revision 1.3 89/12/11 20:48:16 acs
+ * 1) Remove extraneous spaces at end of menu items.
+ * 2) Increase width of checked menu items by CHECKWIDTH instead of by
+ * the width of 2 characters.
+ * 3) Don't highlight the "---" separating the new Strip item from the
+ * other items in the Parity menu.
+ * 4) A little better initialization of the Utility items.
+ *
+ * Revision 1.2 89/11/06 21:25:22 acs
+ * 1) Add new Parity menu item: Strip to remove parity from data destined
+ * for the display.
+ * 2) Add RCS id and change log.
+ *
* v2.9 ACS - Support new cmds EXT. Use S and R for Send and Receive menu
* items instead of ^ and V. AREXX support.
* v2.8a 880331 ACS - Allow lines 0 in init file to *really* mean
***************
*** 84,91 ****
char sp; /* SPace */
char ev; /* EVen */
char od; /* ODd */
! char nl;
! } parcmd_chars = { 'N', ' ', ' ', 'E', 'O', '\0' };
/* Equivalences for the Xfer Mode sub-menu... */
struct modcmd {
--- 104,113 ----
char sp; /* SPace */
char ev; /* EVen */
char od; /* ODd */
! char n0; /* --- */
! char st; /* STrip */
! char n1;
! } parcmd_chars = { 'N', ' ', ' ', 'E', 'O', ' ', ' ', '\0' };
/* Equivalences for the Xfer Mode sub-menu... */
struct modcmd {
***************
*** 131,170 ****
};
static char *modetext[] = {
! " Ascii",
! " Xmodem",
! " XmodemCRC",
! " Kermit"
};
static char *commtext[] = {
"Baud Rate",
! "Parity ",
"Xfer Mode",
! " Shared ",
};
static char *baudtext[] = {
! " 300",
! " 1200",
! " 2400",
! " 4800",
! " 9600"
};
static char *partext[] = {
! " None ",
! " Mark ",
! " Space",
! " Even ",
! " Odd "
};
static char *modtext[] = {
! " Image ",
! " Text ",
! " Convert",
! " AutoChop"
};
static char *scrtext[] = {
--- 153,194 ----
};
static char *modetext[] = {
! "Ascii",
! "Xmodem",
! "XmodemCRC",
! "Kermit"
};
static char *commtext[] = {
"Baud Rate",
! "Parity",
"Xfer Mode",
! "Shared",
};
static char *baudtext[] = {
! " 300",
! "1200",
! "2400",
! "4800",
! "9600"
};
static char *partext[] = {
! "None",
! "Mark",
! "Space",
! "Even",
! "Odd",
! "-------",
! "Strip"
};
static char *modtext[] = {
! "Image",
! "Text",
! "Convert",
! "AutoChop"
};
static char *scrtext[] = {
***************
*** 178,191 ****
"Hang Up",
"Change Dir",
"Clear Scrn",
! " Echo",
! " Wrap",
! " Num Key",
! " App Cur",
! " BS<->DEL",
! " Xfer Beep",
! " Mouse Up",
! " Mouse Dn",
};
struct HowToInit {
--- 202,215 ----
"Hang Up",
"Change Dir",
"Clear Scrn",
! "Echo",
! "Wrap",
! "Num Key",
! "App Cur",
! "BS<->DEL",
! "Xfer Beep ",
! "Mouse Up",
! "Mouse Dn",
};
struct HowToInit {
***************
*** 211,217 ****
modtext, (char *)(&modcmd_chars) },
{ 0, 20, ITEMTEXT | ITEMENABLED | HIGHCOMP,
scrtext, (char *)(&scrcmd_chars) },
! { 0, 16, ITEMTEXT | ITEMENABLED | HIGHCOMP,
utiltext, (char *)(&utilcmd_chars) }
};
--- 235,241 ----
modtext, (char *)(&modcmd_chars) },
{ 0, 20, ITEMTEXT | ITEMENABLED | HIGHCOMP,
scrtext, (char *)(&scrcmd_chars) },
! { 0, 16, ITEMTEXT | ITEMENABLED | HIGHCOMP | CHECKIT | MENUTOGGLE,
utiltext, (char *)(&utilcmd_chars) }
};
***************
*** 591,596 ****
--- 615,621 ----
*******************************************************************/
void InitCommItems()
{
+ struct IntuiText *itext;
int n;
do_menu_init(CommItem, CommText, COMM_INIT_ENTRY, COMMAX);
***************
*** 598,603 ****
--- 623,631 ----
CommItem[1].SubItem = ParItem;
CommItem[2].SubItem = XFItem;
CommItem[3].Flags |= CHECKIT | MENUTOGGLE;
+ CommItem[3].Width += CHECKWIDTH;
+ itext = (struct IntuiText *)CommItem[3].ItemFill;
+ itext->LeftEdge = CHECKWIDTH;
if(p_shared)
CommItem[3].Flags |= CHECKED;
else
***************
*** 632,638 ****
/*****************************************************************/
do_menu_init(ParItem, ParText, PAR_INIT_ENTRY, PARMAX);
! for( n=0; n<PARMAX; n++ ) {
ParItem[n].MutualExclude = (~(1 << n));
}
--- 660,666 ----
/*****************************************************************/
do_menu_init(ParItem, ParText, PAR_INIT_ENTRY, PARMAX);
! for( n=0; n<PARMAX-2; n++ ) {
ParItem[n].MutualExclude = (~(1 << n));
}
***************
*** 639,644 ****
--- 667,680 ----
/* select parity item chekced */
ParItem[p_parity].Flags |= CHECKED;
+ if(p_strip)
+ ParItem[PARMAX-1].Flags |= CHECKED;
+ else
+ ParItem[PARMAX-1].Flags &= (-1L ^ CHECKED);
+
+ ParItem[5].Flags |= HIGHNONE; /* Don't highlight "----" */
+ ParItem[5].Flags &= (-1L ^ (CHECKIT | MENUTOGGLE)); /* No checkmarks */
+
/*****************************************************************/
/* The following initializes the structure arrays */
/* initialize text for specific menu items */
***************
*** 677,689 ****
/*****************************************************************/
void InitUtilItems()
{
int n;
do_menu_init(UtilItem, UtilText, UTIL_INIT_ENTRY, UTILMAX);
/* initialize each menu item and IntuiText with loop */
! for( n=0; n<UTILMAX; n++ ) {
! if (n > 3)
! UtilItem[n].Flags |= CHECKIT | MENUTOGGLE;
}
if (p_echo)
--- 713,725 ----
/*****************************************************************/
void InitUtilItems()
{
+ struct IntuiText *itext;
int n;
do_menu_init(UtilItem, UtilText, UTIL_INIT_ENTRY, UTILMAX);
/* initialize each menu item and IntuiText with loop */
! for(n = 0; n < 4; n++) {
! UtilItem[n].Flags &= (-1L ^ (CHECKIT | MENUTOGGLE));
}
if (p_echo)
***************
*** 769,774 ****
--- 805,812 ----
menuitem[n].LeftEdge = initentry->LeftEdge * Ysize;
menuitem[n].TopEdge = 10 * n;
menuitem[n].Width = initentry->Width * Ysize;
+ if(initentry->Flags & CHECKIT)
+ menuitem[n].Width += CHECKWIDTH;
menuitem[n].Height = 10;
menuitem[n].Flags = initentry->Flags;
menuitem[n].MutualExclude = 0;
***************
*** 787,793 ****
menutext[n].FrontPen = 0;
menutext[n].BackPen = 1;
menutext[n].DrawMode = JAM2;/* render in fore and background */
! menutext[n].LeftEdge = 0;
menutext[n].TopEdge = 1;
menutext[n].ITextFont = NULL;
menutext[n].NextText = NULL;
--- 825,834 ----
menutext[n].FrontPen = 0;
menutext[n].BackPen = 1;
menutext[n].DrawMode = JAM2;/* render in fore and background */
! if(menuitem[n].Flags & CHECKIT)
! menutext[n].LeftEdge = CHECKWIDTH;
! else
! menutext[n].LeftEdge = 0;
menutext[n].TopEdge = 1;
menutext[n].ITextFont = NULL;
menutext[n].NextText = NULL;
Index: kermit.c
*** ./kermit.c Tue Feb 13 09:54:49 1990
--- ../2.9A/kermit.c Tue Feb 13 09:55:06 1990
***************
*** 1,7 ****
--- 1,18 ----
+ static char rcsid[] = "$RCSfile: kermit.c,v $ $Revision: 1.3 $";
+
/*************************************************************
* vt100 terminal emulator - KERMIT protocol support
* :ts=8
*
+ * $Log: kermit.c,v $
+ * Revision 1.3 89/11/02 10:28:28 acs
+ * doksend()/dokreceive(): Memory for spackbuf and msgpkt not freed if
+ * filename == "$".
+ *
+ * Revision 1.2 89/10/25 21:19:54 acs
+ * 1) saybye(): allocate/free msgpkt and spackbuf if necessary.
+ * 2) Add RCS id and change log.
+ *
* v2.9 ACS - Kermit shouldn't NAK packet 0 but timeout waiting for
* send-init then NAK if necessary; terminate each packet with
* EOL only; don't sendstring("\r") but sendchar() it.
***************
*** 111,120 ****
int amount, c, wild;
char *p, **list = NULL;
- msgpkt = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
- spackbuf = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
sending = 1;
if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
p = file;
while(*p && *p != '*' && *p != '?') p++;
if (*p) {
--- 122,131 ----
int amount, c, wild;
char *p, **list = NULL;
sending = 1;
if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
+ msgpkt = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
+ spackbuf = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
p = file;
while(*p && *p != '*' && *p != '?') p++;
if (*p) {
***************
*** 170,180 ****
{
int retval;
- msgpkt = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
- spackbuf = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
ttime = TTIME_KERMIT;
sending = 0;
if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
strcpy(filnam, file);
if (server) strcpy(mainmode,"GET");
else strcpy(mainmode,"RECV");
--- 181,191 ----
{
int retval;
ttime = TTIME_KERMIT;
sending = 0;
if (!strcmp(file,"$")) { saybye(); return(USERABORT); }
+ msgpkt = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
+ spackbuf = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
strcpy(filnam, file);
if (server) strcpy(mainmode,"GET");
else strcpy(mainmode,"RECV");
***************
*** 992,1006 ****
void
saybye()
{
! int len,num;
! if(msgpkt == NULL) /* No msgpkt buffer... */
! return; /* ...so just return. */
if(numreqs != 0) /* Requester's up... */
Delay(5L); /* ...so wait for Intuition, just in case. */
spack('G',n,1,"F"); /* shut down server no more files */
rpack(&len,&num,ackpkt);
}
static void
--- 1003,1029 ----
void
saybye()
{
! int len, num, gotbuf = 0;
! if(msgpkt == NULL) { /* No msgpkt buffer, create one */
! msgpkt = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
! spackbuf = (char *)AllocMem((long)(MAXLONGPKS+20), MEMF_PUBLIC|MEMF_CLEAR);
! if(msgpkt == NULL || spackbuf == NULL) {
! InfoMsg1Line("KERMIT: Insufficient free memory, BYE bypassed");
! return;
! }
! gotbuf = 1;
! }
if(numreqs != 0) /* Requester's up... */
Delay(5L); /* ...so wait for Intuition, just in case. */
spack('G',n,1,"F"); /* shut down server no more files */
rpack(&len,&num,ackpkt);
+ if(gotbuf) {
+ FreeMem(spackbuf, (long)(MAXLONGPKS+20));
+ FreeMem(msgpkt, (long)(MAXLONGPKS+20));
+ msgpkt = spackbuf = NULL;
+ }
}
static void
Index: remote.c
*** ./remote.c Tue Feb 13 09:54:51 1990
--- ../2.9A/remote.c Tue Feb 13 09:55:07 1990
***************
*** 1,7 ****
--- 1,23 ----
+ static char rcsid[] = "$RCSfile: remote.c,v $ $Revision: 1.4 $";
+
/****************************************************
* vt100 emulator - remote character interpretation
* :ts=8
*
+ * $Log: remote.c,v $
+ * Revision 1.4 89/12/18 20:44:21 acs
+ * doremote() no longer needs to strip parity...the main loop in vt100.c
+ * takes care of it now.
+ *
+ * Revision 1.3 89/11/02 10:13:38 acs
+ * doremote(): strip parity from data destined for display if user has
+ * requested it (p_strip is set).
+ *
+ * Revision 1.2 89/11/01 20:28:42 acs
+ * 1) Correct use of Ysize in coordinate calculation. Thanks to Sean
+ * Hogan (sean2@garfield.mun.ca).
+ * 2) Add RCS id and change log.
+ *
* V2.9 ACS - CAN was not cancelling a control sequence (thanks
* to Bill Kinnersly.
* V2.8 Insert/delete character (@/P) by John Wang
***************
*** 201,207 ****
case 'H': case 'f': /* Cursor position */
if (p[0] <= 0) p[0] = 1;
if (p[1] <= 0) p[1] = 1;
! y = (--p[0]*Ysize)+MINY; x = (--p[1]*Ysize)+MINX;
if (y > MAXY) y = MAXY;
if (x > MAXX) x = MAXX;
if (y < MINY) y = MINY;
--- 217,223 ----
case 'H': case 'f': /* Cursor position */
if (p[0] <= 0) p[0] = 1;
if (p[1] <= 0) p[1] = 1;
! y = (--p[0]*Ysize)+MINY; x = (--p[1]*Xsize)+MINX;
if (y > MAXY) y = MAXY;
if (x > MAXX) x = MAXX;
if (y < MINY) y = MINY;
Index: rexx.c
*** ./rexx.c Tue Feb 13 09:54:51 1990
--- ../2.9A/rexx.c Tue Feb 13 09:55:07 1990
***************
*** 1,7 ****
--- 1,13 ----
+ static char rcsid[] = "$RCSfile: rexx.c,v $ $Revision: 1.2 $";
+
/*************************************************************
* vt100 terminal emulator - AREXX support
* :ts=8
*
+ * $Log: rexx.c,v $
+ * Revision 1.2 89/12/19 20:38:59 acs
+ * Added RCS id and change log.
+ *
* v2.9 ACS - New with this version.
*
*************************************************************/
Index: script.c
*** ./script.c Tue Feb 13 09:54:52 1990
--- ../2.9A/script.c Tue Feb 13 09:55:07 1990
***************
*** 1,7 ****
--- 1,29 ----
+ static char rcsid[] = "$RCSfile: script.c,v $ $Revision: 1.5 $";
+
/*************************************************************
* vt100 terminal emulator - Script file support
* :ts=8
*
+ * $Log: script.c,v $
+ * Revision 1.5 89/12/14 20:32:10 acs
+ * Wasn't beeping after a transfer using external protocols.
+ *
+ * Revision 1.4 89/12/11 20:35:04 acs
+ * 1) do_script_cmd(): if(CmdFromRexx) should return a value. Thanks to
+ * William Dimm (wdimm@lehi3b15.csee.Lehigh.EDU).
+ * 2) cmd_ext(): After successfully deleting an external protocol it should
+ * return CMDOK. Thanks again, William!
+ * 3) Displaynames for external protocols no longer need 2 spaces before
+ * the name.
+ *
+ * Revision 1.3 89/11/02 10:27:06 acs
+ * New command: STRIP which will strip parity from data destined for
+ * display.
+ *
+ * Revision 1.2 89/11/01 15:32:54 acs
+ * 1) Make cmd_from_script accessible to other source modules.
+ * 2) Add RCS id and change log.
+ *
* v2.9 ACS - Add support for font size, external transfer program
* support, new ASIS option to LACE cmd and AREXX support.
* v2.8a 880331 ACS - Allow comments on XPROTO and FONT.
***************
*** 142,147 ****
--- 164,170 ----
cmd_sendf, "sendfile", 5, SCRIPT, /* send a file to host */
cmd_share, "shareserial", 5, INIT|SCRIPT, /* ShareSerial device */
cmd_short, "shortcut", 3, INIT, /* Set shortcuts */
+ cmd_strip, "strip", 2, INIT|SCRIPT, /* Strip parity for display */
cmd_swap, "swap", 4, INIT|SCRIPT, /* Swap BS and DEL */
cmd_unit, "unit", 4, INIT, /* Unit of serial.device to use */
cmd_volume, "volume", 3, INIT, /* set volume */
***************
*** 193,198 ****
--- 216,222 ----
char sp; /* SPace */
char ev; /* EVen */
char od; /* ODd */
+ char st; /* STrip */
char nl;
} parcmd_chars;
***************
*** 259,264 ****
--- 283,289 ----
"space", &(parcmd_chars.sp), /* Set Parity */
"even", &(parcmd_chars.ev), /* Set Parity */
"odd", &(parcmd_chars.od), /* Set Parity */
+ "strip", &(parcmd_chars.st), /* Strip parity */
"image", &(modcmd_chars.im), /* KERMIT transfer mode */
"text", &(modcmd_chars.tx), /* KERMIT transfer mode */
"convert", &(modcmd_chars.cn), /* KERMIT transfer mode */
***************
*** 284,290 ****
NULL, NULL
};
! static int cmd_from_script; /* != 0 iff cmd from a script */
/********************************************************************/
--- 309,315 ----
NULL, NULL
};
! int cmd_from_script; /* != 0 iff cmd from a script */
/********************************************************************/
***************
*** 461,467 ****
script_wait = FALSE;
if(CmdFromRexx)
! return;
while(fgets(line,256,sf) != NULL) {
len = strlen(line);
--- 486,492 ----
script_wait = FALSE;
if(CmdFromRexx)
! return 0;
while(fgets(line,256,sf) != NULL) {
len = strlen(line);
***************
*** 734,740 ****
NumExts--;
if(!doing_init)
InitFileItems();
! return;
}
}
nxfer = i; /* Remember index of match or where to put new... */
--- 759,765 ----
NumExts--;
if(!doing_init)
InitFileItems();
! return CMDOK;
}
}
nxfer = i; /* Remember index of match or where to put new... */
***************
*** 781,789 ****
/* Initialize the new ExternalXfer entry. Leave room in dispname for
** a checkmark (2 character widths). */
len = strlen(dn);
! cexp->dispname = (char *)AllocMem((long)len+3, mem_type);
! strcpy(cexp->dispname, " ");
! strcat(cexp->dispname, dn);
cexp->downname = (char *)AllocMem((long)len+1, mem_type);
for(i = 0; i < len; i++)
cexp->downname[i] = dn[i] | ' ';
--- 806,813 ----
/* Initialize the new ExternalXfer entry. Leave room in dispname for
** a checkmark (2 character widths). */
len = strlen(dn);
! cexp->dispname = (char *)AllocMem((long)len+1, mem_type);
! strcpy(cexp->dispname, dn);
cexp->downname = (char *)AllocMem((long)len+1, mem_type);
for(i = 0; i < len; i++)
cexp->downname[i] = dn[i] | ' ';
***************
*** 1623,1628 ****
--- 1647,1659 ----
return CMDFAIL;
}
+ cmd_strip(par)
+ char *par;
+ {
+ setvar(par,0,&p_strip);
+ return CMDOK;
+ }
+
cmd_key(par)
char *par;
{
***************
*** 1777,1781 ****
--- 1808,1814 ----
if(!p_shared && OpenDevice(mysername,(LONG)p_unit,(struct IORequest *)Read_Request,NULL))
cleanup("Can't re-open Read device",0);
setparams();
+ if(p_xbeep)
+ cmd_beep(0L);
return CMDOK;
}
Index: vt100.c
*** ./vt100.c Tue Feb 13 09:54:53 1990
--- ../2.9A/vt100.c Tue Feb 13 09:55:08 1990
***************
*** 1,7 ****
--- 1,46 ----
+ static char rcsid[] = "$RCSfile: vt100.c,v $ $Revision: 1.8 $";
+ static char hrcsid[] = HRCSID;
+
/********************************************************************
* vt100 terminal emulator with xmodem transfer capability
* :ts=8
*
+ * $Log: vt100.c,v $
+ * Revision 1.8 90/02/12 20:25:05 acs
+ * Include reference to HRCSID defined in vt100.h.
+ *
+ * Revision 1.7 90/01/01 21:03:53 acs
+ * 1) do_capture() shouldn't strcpy() to XferredFileName.
+ * 2) do_capture() should use name instead of XferredFileName.
+ * 3) do_send() would only prompt for filename once.
+ *
+ * Revision 1.6 89/12/18 20:52:38 acs
+ * Strip parity from inbound serial data if p_strip or p_parity is set.
+ * Used to be that this module would only strip parity if p_parity was
+ * set; it was up to subordinate routines to strip parity if p_strip
+ * was set (notably, emit() and doremote()).
+ *
+ * Revision 1.5 89/12/13 22:02:17 acs
+ * p_bs_del is now based on flag set in selected menu item, too.
+ *
+ * Revision 1.4 89/12/12 22:18:02 acs
+ * 1) Give selected menu item to handle_menupick().
+ * 2) Base new values of p_* on flags set in selected menu item.
+ *
+ * Revision 1.3 89/11/06 22:07:46 acs
+ * 1) Used 8 instead of Xsize and Ysize and 6 instead of BaseLine in mouse
+ * location calculation. Thanks to Evan Harris (evan@cs.mu.oz.au).
+ * 2) Mouse location routine would call sendchar() with 2 parameters
+ * (thanks again Evan!).
+ * 3) Support new STRIP command and menu option (p_strip).
+ *
+ *
+ * Revision 1.2 89/11/01 20:37:10 acs
+ * 1) Don't poll serial port while executing a script unless we're waiting
+ * or delaying.
+ * 2) ASCII Capture would only prompt for filename once.
+ * 3) Add RCS id and change log.
+ *
* v2.9 ACS - Only strip parity if parity is enabled; handle external xfer
* items in handle_menupick(); new p_interlace value (2).
* v2.8a 880331 ACS - Don't ReplyMsg too soon.
***************
*** 246,251 ****
--- 285,291 ----
int p_background = 0x000; /* default background RGB color */
int p_bold = 0x000; /* default BOLD RGB color */
int p_cursor = 0x00d; /* default Cursor RGB color */
+ int p_strip = 1; /* Strip parity from data for terminal */
int p_mouse_up = 0; /* 1 = send mouse UP events */
int p_mouse_down = 0; /* 1 = send mouse DOWN events */
int p_lines = 0; /* 0 == use all available (MoreRows) */
***************
*** 282,287 ****
--- 322,328 ----
/* for script file */
extern char on_string[], wait_string[];
+ extern int cmd_from_script; /* in script.c */
int script_on, script_wait;
int doing_init = 0;
***************
*** 393,404 ****
}
/* see if there are any characters from the host */
! if (CheckIO((struct IORequest *)Read_Request)) {
register int fwdndx = 0;
struct MsgPort *FwdPort;
WaitIO((struct IORequest *)Read_Request);
! c = rs_in[0] & (p_parity ? 0x7F : 0xFF);
#if AREXX
fwdchars[fwdndx++] = c;
#endif
--- 434,449 ----
}
/* see if there are any characters from the host */
! if ( (!script_on || (script_on && script_wait))
! && CheckIO((struct IORequest *)Read_Request)) {
register int fwdndx = 0;
struct MsgPort *FwdPort;
WaitIO((struct IORequest *)Read_Request);
! if(p_parity || p_strip)
! c = rs_in[0] & 0x7f;
! else
! c = rs_in[0];
#if AREXX
fwdchars[fwdndx++] = c;
#endif
***************
*** 421,433 ****
dola = 1;
else
dola = 0;
! Read_Request->IOSer.io_Length =
! Read_Request->IOSer.io_Actual;
DoIO((struct IORequest *)Read_Request);
Read_Request->IOSer.io_Length = 1;
for (i = 0; i < actual; i++) {
! c=rs_in[i] & (p_parity ? 0x7f : 0xff);
#if AREXX
if(fwdndx < 255)
fwdchars[fwdndx++] = c;
--- 466,482 ----
dola = 1;
else
dola = 0;
! if(actual > sizeof(lookahead))
! actual = sizeof(lookahead);
! Read_Request->IOSer.io_Length = actual;
DoIO((struct IORequest *)Read_Request);
Read_Request->IOSer.io_Length = 1;
for (i = 0; i < actual; i++) {
! if(p_parity || p_strip)
! c = rs_in[i] & 0x7f;
! else
! c = rs_in[i];
#if AREXX
if(fwdndx < 255)
fwdchars[fwdndx++] = c;
***************
*** 527,533 ****
unsigned int newcode =
(Item ? Item->NextSelect : code);
! redo |= handle_menupick(class,code);
if(code == newcode)
code = MENUNULL;
else
--- 576,582 ----
unsigned int newcode =
(Item ? Item->NextSelect : code);
! redo |= handle_menupick(class,code, Item);
if(code == newcode)
code = MENUNULL;
else
***************
*** 558,565 ****
sendstring(p_f[10]);
sendchar(mouse_qual + '@');
! sendchar(' ' + ((mouse_x - MINX) / 8),10); /* column */
! sendchar(' ' + ((mouse_y - MINY + 6 ) / 8),10);/* row */
}
break;
--- 607,614 ----
sendstring(p_f[10]);
sendchar(mouse_qual + '@');
! sendchar(' ' + ((mouse_x - MINX) / Xsize)); /* column */
! sendchar(' ' + ((mouse_y - MINY + BaseLine ) / Ysize));/* row */
}
break;
***************
*** 570,577 ****
} /* end of while ( newmessage )*/
if (!script_wait ||
! (CheckIO((struct IORequest *)&Script_Timer) &&
! script_wait == WAIT_TIMER))
do_script_cmd(NEXTCOMMAND);
while( reqwinup && ((NewMessage = (struct IntuiMessage *)
--- 619,626 ----
} /* end of while ( newmessage )*/
if (!script_wait ||
! (script_wait == WAIT_TIMER &&
! CheckIO((struct IORequest *)&Script_Timer)))
do_script_cmd(NEXTCOMMAND);
while( reqwinup && ((NewMessage = (struct IntuiMessage *)
***************
*** 703,720 ****
do_capture(file)
char *file;
{
if (capture == TRUE) {
capture=FALSE;
fclose(tranr);
InfoMsg1Line("End File Capture");
} else {
! if (file == NULL || *file == '\0') {
! req("Ascii Capture:",XferredFileName,1);
! } else
! strcpy(XferredFileName, file);
! if ((tranr=fopen(XferredFileName,"w")) == 0) {
capture=FALSE;
! InfoMsg2Line("Error Opening File:", XferredFileName);
return(FALSE);
}
capture=TRUE;
--- 752,777 ----
do_capture(file)
char *file;
{
+ char name[MAXGADSTR];
+
if (capture == TRUE) {
capture=FALSE;
fclose(tranr);
InfoMsg1Line("End File Capture");
} else {
! if(file)
! strcpy(name, file);
! else
! name[0] = '\0';
!
! if (file == NULL || *file == '\0' || !cmd_from_script) {
! req("Ascii Capture:",name,1);
! if(file && !cmd_from_script)
! strcpy(file, name);
! }
! if ((tranr=fopen(name,"w")) == 0) {
capture=FALSE;
! InfoMsg2Line("Error Opening File:", name);
return(FALSE);
}
capture=TRUE;
***************
*** 725,742 ****
do_send(file)
char *file;
{
if (send == TRUE) {
send=FALSE;
fclose(trans);
InfoMsg1Line("File Send Cancelled");
} else {
! if (file == NULL || *file == '\0') {
! req("Ascii Send:", XferredFileName, 1);
! } else
! strcpy(XferredFileName, file);
! if ((trans=fopen(XferredFileName, "r")) == 0) {
send=FALSE;
! InfoMsg2Line("Error Opening File:", XferredFileName);
return(FALSE);
}
send=TRUE;
--- 782,807 ----
do_send(file)
char *file;
{
+ char name[MAXGADSTR];
+
if (send == TRUE) {
send=FALSE;
fclose(trans);
InfoMsg1Line("File Send Cancelled");
} else {
! if(file)
! strcpy(name, file);
! else
! name[0] = '\0';
!
! if (file == NULL || *file == '\0' || !cmd_from_script) {
! req("Ascii Send:",name,1);
! if(file && !cmd_from_script)
! strcpy(file, name);
! }
! if ((trans=fopen(name, "r")) == 0) {
send=FALSE;
! InfoMsg2Line("Error Opening File:", name);
return(FALSE);
}
send=TRUE;
***************
*** 802,810 ****
SetMenuStrip(mywindow,&menu[0]);
}
! ULONG handle_menupick(class, code)
ULONG class;
unsigned int code;
{
unsigned int menunum, itemnum, subnum, i;
int nxfer;
--- 867,876 ----
SetMenuStrip(mywindow,&menu[0]);
}
! ULONG handle_menupick(class, code, Item)
ULONG class;
unsigned int code;
+ struct MenuItem *Item;
{
unsigned int menunum, itemnum, subnum, i;
int nxfer;
***************
*** 886,894 ****
break;
case 1: /* menunum case 1 itemnum 1 -- Set Parity */
! p_parity = subnum;
break;
-
case 2: /* menunum case 1 itemnum 2 -- set transfer mode */
switch(subnum) {
case 0:
--- 952,970 ----
break;
case 1: /* menunum case 1 itemnum 1 -- Set Parity */
! switch(subnum) {
! case 0: case 1: case 2: case 3: case 4:
! p_parity = subnum;
! break;
! case 6:
! if(Item->Flags & CHECKED)
! p_strip = 1;
! else
! p_strip = 0;
! break;
! }
! retval |= REDOCOMM;
break;
case 2: /* menunum case 1 itemnum 2 -- set transfer mode */
switch(subnum) {
case 0:
***************
*** 896,911 ****
p_mode = subnum;
break;
case 2:
! if (p_convert)
! p_convert = 0;
! else
p_convert = 1;
break;
case 3:
! if(p_autochop)
! p_autochop = 0;
! else
p_autochop = 1;
break;
}
retval |= REDOCOMM;
--- 972,987 ----
p_mode = subnum;
break;
case 2:
! if(Item->Flags & CHECKED)
p_convert = 1;
+ else
+ p_convert = 0;
break;
case 3:
! if(Item->Flags & CHECKED)
p_autochop = 1;
+ else
+ p_autochop = 0;
break;
}
retval |= REDOCOMM;
***************
*** 914,923 ****
{
char onoff[4];
! if(p_shared)
! strcpy(onoff, "off");
! else
strcpy(onoff, "on");
cmd_share(onoff);
}
break;
--- 990,999 ----
{
char onoff[4];
! if(Item->Flags & CHECKED)
strcpy(onoff, "on");
+ else
+ strcpy(onoff, "off");
cmd_share(onoff);
}
break;
***************
*** 969,1031 ****
break;
case 4: /* menunum case 3 itemnum case 4 -- Echo mode */
! if (p_echo)
! p_echo = 0;
! else
p_echo = 1;
retval |= REDOUTIL;
break;
case 5: /* menunum case 3 itemnum case 5 -- Wrap mode */
! if (p_wrap)
! p_wrap = 0;
! else
p_wrap = 1;
retval |= REDOUTIL;
break;
case 6: /* menunum case 3 itemnum case 6 -- NumKey */
! if (p_keyapp)
! p_keyapp = 0;
! else
p_keyapp = 1;
retval |= REDOUTIL;
break;
case 7: /* menunum case 3 itemnum case 7 -- App Cur */
! if (p_curapp)
! p_curapp = 0;
! else
p_curapp = 1;
retval |= REDOUTIL;
break;
case 8: /* menunum case 3 itemnum case 8 -- BS <-> DEL */
! swap_bs_del();
retval |= REDOUTIL;
break;
case 9: /* menunum case 3 itemnum case 9 -- Xfer Beep */
! if(p_xbeep)
! p_xbeep = 0;
! else
p_xbeep = 1;
retval |= REDOUTIL;
break;
case 10: /* menunum case 3 itemnum case 10 - Mouse Up */
! if(p_mouse_up)
! p_mouse_up = 0;
! else
p_mouse_up = 1;
retval |= REDOUTIL;
break;
case 11: /* menunum case 3 itemnum case 11 - Mouse Down */
! if(p_mouse_down)
! p_mouse_down = 0;
! else
p_mouse_down = 1;
retval |= REDOUTIL;
break;
}
--- 1045,1110 ----
break;
case 4: /* menunum case 3 itemnum case 4 -- Echo mode */
! if(Item->Flags & CHECKED)
p_echo = 1;
+ else
+ p_echo = 0;
retval |= REDOUTIL;
break;
case 5: /* menunum case 3 itemnum case 5 -- Wrap mode */
! if(Item->Flags & CHECKED)
p_wrap = 1;
+ else
+ p_wrap = 0;
retval |= REDOUTIL;
break;
case 6: /* menunum case 3 itemnum case 6 -- NumKey */
! if(Item->Flags & CHECKED)
p_keyapp = 1;
+ else
+ p_keyapp = 0;
retval |= REDOUTIL;
break;
case 7: /* menunum case 3 itemnum case 7 -- App Cur */
! if(Item->Flags & CHECKED)
p_curapp = 1;
+ else
+ p_curapp = 0;
retval |= REDOUTIL;
break;
case 8: /* menunum case 3 itemnum case 8 -- BS <-> DEL */
! if(Item->Flags & CHECKED)
! p_bs_del = 1;
! else
! p_bs_del = 0;
retval |= REDOUTIL;
break;
case 9: /* menunum case 3 itemnum case 9 -- Xfer Beep */
! if(Item->Flags & CHECKED)
p_xbeep = 1;
+ else
+ p_xbeep = 0;
retval |= REDOUTIL;
break;
case 10: /* menunum case 3 itemnum case 10 - Mouse Up */
! if(Item->Flags & CHECKED)
p_mouse_up = 1;
+ else
+ p_mouse_up = 0;
retval |= REDOUTIL;
break;
case 11: /* menunum case 3 itemnum case 11 - Mouse Down */
! if(Item->Flags & CHECKED)
p_mouse_down = 1;
+ else
+ p_mouse_down = 0;
retval |= REDOUTIL;
break;
}
Index: vt100.doc
*** ./vt100.doc Tue Feb 13 09:54:54 1990
--- ../2.9A/vt100.doc Tue Feb 13 09:55:08 1990
***************
*** 51,58 ****
.
. - externally defined transfer programs
.
! Send (A-^) - Send a file using the selected protocol
! Receive (A-V) - Receive a file as above
Kermit Get (A-G) - Get files from a kermit server
Kermit Bye (A-B) - Finish with the kermit server.
Capture - Log received text to a file. Changes to
--- 51,58 ----
.
. - externally defined transfer programs
.
! Send (A-S) - Send a file using the selected protocol
! Receive (A-R) - Receive a file as above
Kermit Get (A-G) - Get files from a kermit server
Kermit Bye (A-B) - Finish with the kermit server.
Capture - Log received text to a file. Changes to
***************
*** 182,191 ****
character of the function key definition is the KEYSCRIPT character (e.g.,
define F5 as "~df1:foo.script").
! During the time script file is running the terminal emulation is still
! active and you may type simulataneous to the script file. This may be
! desired if your script file is WAITing for a string or is DELAYing for a
! period of time etc.
AREXX support:
--------------
--- 182,200 ----
character of the function key definition is the KEYSCRIPT character (e.g.,
define F5 as "~df1:foo.script").
! Prior to release 2.9A (a patch release to 2.9), VT100 would interleave
! script command execution with the processing of data received from the
! serial port. This made scripts inherently timing dependant. To remove
! this timing dependancy, beginning with 2.9A, VT100 will not receive nor
! process data from the serial port while executing a script until the
! script issues a WAIT or a DELAY command. Since the ON command depends
! on receipt of serial data, this change will also delay ON command
! execution until a WAIT or DELAY is encountered in the script as well.
! However, during the time a script file is running terminal emulation is
! still active and you may type simulataneous with the execution of the
! script file. This may be desired if your script file is WAITing for a
! string or is DELAYing for a period of time etc. You may, of course,
! cancel the execution of a script at any time
AREXX support:
--------------
***************
*** 673,679 ****
EVEN - Set Parity even ODD - Set Parity odd
IMAGE - KERMIT transfer mode TEXT - KERMIT transfer mode
CONVERT - KERMIT transfer mode AUTOCHOP - Enable/disable XMODEM
! auto-chop feature
>> Script items: <<
EXECUTE - execute macro ABORT - abort macro
RX - send AREXX command
--- 682,689 ----
EVEN - Set Parity even ODD - Set Parity odd
IMAGE - KERMIT transfer mode TEXT - KERMIT transfer mode
CONVERT - KERMIT transfer mode AUTOCHOP - Enable/disable XMODEM
! STRIP - Strip parity of serial auto-chop feature
! data destined for terminal
>> Script items: <<
EXECUTE - execute macro ABORT - abort macro
RX - send AREXX command
***************
*** 691,696 ****
--- 701,715 ----
SHORTCUT XS removes the shortcut key for sending via
XMODEM protocol
--------------------------------------------------------------------------
+ STRIP Strip parity of data destined for terminal (INIT,SCRIPT)
+ Format:
+ STRIP ON/OFF or YES/NO
+ Example:
+ STRIP ON Prior to displaying data from the remote host,
+ remove the parity. This will "clean up" displays
+ from hosts which can't or won't recognize your
+ parity settings.
+ --------------------------------------------------------------------------
SWAP Swap the meanings of backspace and delete keys (INIT,SCRIPT)
Format:
SWAP ON/OFF or YES/NO
***************
*** 742,748 ****
--------------------------------------------------------------------------
XPROTO Set default transfer protocol (INIT,SCRIPT)
Format:
! XPROTO XMODEM/XMODEMCRC/KERMIT/an external protocol
Example:
XPROTO KERMIT Sets transfer protocol to Kermit
--------------------------------------------------------------------------
--- 761,767 ----
--------------------------------------------------------------------------
XPROTO Set default transfer protocol (INIT,SCRIPT)
Format:
! XPROTO ASCII/XMODEM/XMODEMCRC/KERMIT/an external protocol
Example:
XPROTO KERMIT Sets transfer protocol to Kermit
--------------------------------------------------------------------------
Index: window.c
*** ./window.c Tue Feb 13 09:54:55 1990
--- ../2.9A/window.c Tue Feb 13 09:55:09 1990
***************
*** 1,7 ****
--- 1,29 ----
+ static char rcsid[] = "$RCSfile: window.c,v $ $Revision: 1.5 $";
+
/****************************************************
* vt100 emulator - window/keyboard support
* :ts=8
*
+ * $Log: window.c,v $
+ * Revision 1.5 90/01/23 20:17:11 acs
+ * 1) Machine would lock up due to req() "missing" some events. Thanks
+ * to Patrick Horgan (phorgan@cup.portal.com) for all his work on
+ * this one!
+ * 2) Remove some extraneous white-space for appearances sake.
+ *
+ * Revision 1.4 89/12/18 20:47:12 acs
+ * emit() no longer needs to strip parity...the main loop in vt100.c
+ * takes care of it now.
+ *
+ * Revision 1.3 89/11/02 10:14:24 acs
+ * Support for new STRIP command to strip parity from data destined for
+ * display.
+ *
+ * Revision 1.2 89/11/01 20:32:28 acs
+ * 1) Correct interchanged use of Xsize and Ysize. Thanks to Sean Hogan
+ * (sean2@garfield.mun.ca).
+ * 2) Add RCS id and change log.
+ *
* v2.9 ACS - See change summary.
* v2.7 870825 ACS - Provide an info/status window rather than using
* req(). Better error handling.
***************
*** 88,94 ****
#if MANX
USHORT RemoveGadget();
#endif /* MANX */
! int lprmpt, lname;
struct IntuiMessage *Msg;
if(reqwinup == 0)
--- 110,116 ----
#if MANX
USHORT RemoveGadget();
#endif /* MANX */
! int lprmpt, lname, done;
struct IntuiMessage *Msg;
if(reqwinup == 0)
***************
*** 124,129 ****
--- 146,152 ----
/* Make sure the prompt gets updated */
if (numreqs == 1 && strcmp(Prompt,prmpt) != 0) {
EndRequest(&myrequest,reqwindow);
+ done = 0;
do {
Wait(1L << reqwindow->UserPort->mp_SigBit);
while (Msg = (struct IntuiMessage *)GetMsg(reqwindow->UserPort)) {
***************
*** 131,138 ****
ReplyMsg((struct Message *)Msg);
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
}
! } while (class != REQCLEAR);
numreqs = 0;
}
--- 154,163 ----
ReplyMsg((struct Message *)Msg);
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
+ if(class == REQCLEAR)
+ done = 1;
}
! } while(!done);
numreqs = 0;
}
***************
*** 154,159 ****
--- 179,185 ----
}
else numreqs = 1;
+ done = 0;
do {
Wait(1L << reqwindow->UserPort->mp_SigBit);
while (Msg = (struct IntuiMessage *)GetMsg(reqwindow->UserPort)) {
***************
*** 163,170 ****
numreqs = 0;
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
}
! } while (class != REQSET);
} /* end while numreqs != 0 */
} /* end else */
--- 189,198 ----
numreqs = 0;
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
+ if(class == REQSET)
+ done = 1;
}
! } while(!done);
} /* end while numreqs != 0 */
} /* end else */
***************
*** 174,179 ****
--- 202,208 ----
if((reqwindow->Flags & WINDOWACTIVE) != WINDOWACTIVE) {
WindowToFront(reqwindow);
ActivateWindow(reqwindow);
+ done = 0;
do {
Wait(1L << reqwindow->UserPort->mp_SigBit);
while(Msg = (struct IntuiMessage *)GetMsg(reqwindow->UserPort)) {
***************
*** 181,188 ****
ReplyMsg((struct Message *)Msg);
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
}
! } while (class != ACTIVEWINDOW);
}
/* here is where we pre-select the gadget */
--- 210,219 ----
ReplyMsg((struct Message *)Msg);
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
+ if(class == ACTIVEWINDOW)
+ done = 1;
}
! } while(!done);
}
/* here is where we pre-select the gadget */
***************
*** 198,204 ****
/* try once more before giving up... */
ActivateGadget(&mystrgad,reqwindow,&myrequest);
! }
/* wait for input to show up */
while (1) {
--- 229,235 ----
/* try once more before giving up... */
ActivateGadget(&mystrgad,reqwindow,&myrequest);
! }
/* wait for input to show up */
while (1) {
***************
*** 206,212 ****
GetMsg(reqwindow->UserPort)) == FALSE) {
Wait(1L<<reqwindow->UserPort->mp_SigBit);
continue;
! }
class = NewMessage->Class;
ReplyMsg((struct Message *)NewMessage);
--- 237,243 ----
GetMsg(reqwindow->UserPort)) == FALSE) {
Wait(1L<<reqwindow->UserPort->mp_SigBit);
continue;
! }
class = NewMessage->Class;
ReplyMsg((struct Message *)NewMessage);
***************
*** 216,224 ****
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
! /* maybe this is a menu item to handle */
! /* if (class == MENUPICK) handle_menupick(class,code); */
! }
/* all done, so return the result */
numreqs = 0;
--- 247,253 ----
if(class == NEWSIZE)
ReqNewSize(reqwindow->Height, reqwindow->Width);
! }
/* all done, so return the result */
numreqs = 0;
***************
*** 254,264 ****
{
static char wrap_flag = 0; /* are we at column 80? */
- c &= 0x7F;
switch( c )
{
case '\t':
! x += (Ysize * 8) - ((x-MINX) % (Ysize * 8));
break;
case 10: /* lf */
--- 283,292 ----
{
static char wrap_flag = 0; /* are we at column 80? */
switch( c )
{
case '\t':
! x += (Xsize * 8) - ((x-MINX) % (Xsize * 8));
break;
case 10: /* lf */
***************
*** 691,698 ****
if(init) {
myrequest.LeftEdge = (myrequest.LeftEdge * Xsize) + 5;
myrequest.TopEdge = (myrequest.TopEdge * Ysize) + 2;
! myrequest.Width = (myrequest.Width * Ysize) + 4;
! myrequest.Height = (myrequest.Height * Xsize) + 6;
mydonegad.LeftEdge = (mydonegad.LeftEdge * Xsize) + 2;
mydonegad.TopEdge = (mydonegad.TopEdge * Ysize) + 2;
--- 719,726 ----
if(init) {
myrequest.LeftEdge = (myrequest.LeftEdge * Xsize) + 5;
myrequest.TopEdge = (myrequest.TopEdge * Ysize) + 2;
! myrequest.Width = (myrequest.Width * Xsize) + 4;
! myrequest.Height = (myrequest.Height * Ysize) + 6;
mydonegad.LeftEdge = (mydonegad.LeftEdge * Xsize) + 2;
mydonegad.TopEdge = (mydonegad.TopEdge * Ysize) + 2;
***************
*** 701,708 ****
mystrgad.LeftEdge = (mystrgad.LeftEdge * Xsize) + 2;
mystrgad.TopEdge = (mystrgad.TopEdge * Ysize) + 4;
! mystrgad.Width = (mystrgad.Width * Ysize) + 0;
! mystrgad.Height = (mystrgad.Height * Xsize) + 2;
donetxt.LeftEdge = (donetxt.LeftEdge * Xsize) + 0;
donetxt.TopEdge = (donetxt.TopEdge * Ysize) + 0;
--- 729,736 ----
mystrgad.LeftEdge = (mystrgad.LeftEdge * Xsize) + 2;
mystrgad.TopEdge = (mystrgad.TopEdge * Ysize) + 4;
! mystrgad.Width = (mystrgad.Width * Xsize) + 0;
! mystrgad.Height = (mystrgad.Height * Ysize) + 2;
donetxt.LeftEdge = (donetxt.LeftEdge * Xsize) + 0;
donetxt.TopEdge = (donetxt.TopEdge * Ysize) + 0;
Index: xmodem.c
*** ./xmodem.c Tue Feb 13 09:54:55 1990
--- ../2.9A/xmodem.c Tue Feb 13 09:55:09 1990
***************
*** 1,7 ****
--- 1,19 ----
+ static char rcsid[] = "$RCSfile: xmodem.c,v $ $Revision: 1.3 $";
+
/*************************************************************
* vt100 terminal emulator - XMODEM protocol support
* :ts=8
*
+ * $Log: xmodem.c,v $
+ * Revision 1.3 89/12/14 20:33:37 acs
+ * 1) Use longs for byte count in xmodem transfers.
+ * 2) Remove commented out code.
+ *
+ * Revision 1.2 89/12/12 13:39:05 acs
+ * multi_xfer() will pass "$" to called routines. This means that
+ * XMODEM_Read_File(), XMODEM_Send_File() and the kermit routines need
+ * to check for a filename == "$".
+ *
* v2.9 ACS - multi_xfer() no longer looks for $ -- kermit does,
* readchar() now infers ttime of 100,000 micros if ttime == 0
* (for newkermit); readchar() doesn't output a TIMED OUT msg
***************
*** 287,292 ****
--- 299,307 ----
unsigned short crc;
char scrstr2[40];
+ if(strcmp(file, "$") == 0)
+ return TRUE;
+
bytes_xferred = 0L;
ttime = TTIME_SHORT;
***************
*** 320,327 ****
}
if (firstchar == SOH) {
! sprintf(scrstr2,"%s: Block: %4d Bytes: %d",
! p_xproto==2?"XmodemCRC":"Xmodem", sectnum, sectnum*SECSIZ);
InfoMsgNoScroll(scrstr2);
sectcurr = readchar();
if (timeout != GOODREAD)
--- 335,343 ----
}
if (firstchar == SOH) {
! sprintf(scrstr2,"%s: Block: %4d Bytes: %ld",
! p_xproto==2?"XmodemCRC":"Xmodem", sectnum,
! ((long)sectnum)*SECSIZ);
InfoMsgNoScroll(scrstr2);
sectcurr = readchar();
if (timeout != GOODREAD)
***************
*** 363,373 ****
goto exit;
} else {
errors = 0;
- /* sprintf(scrstr2,"Block %4d verified",sectnum); */
sectnum++;
bufptr += SECSIZ;
bytes_xferred += SECSIZ;
- /* InfoMsgNoScroll(scrstr2); */
if (bufptr == BufSize) {
if (write(fd, bufr, BufSize-SECSIZ) == EOF) {
InfoMsg1Line("XMODEM: Error Writing File");
--- 379,387 ----
***************
*** 433,438 ****
--- 447,455 ----
unsigned short crc;
char scrstr2[40];
+ if(strcmp(file, "$") == 0)
+ return TRUE;
+
bytes_xferred = 0;
ttime = TTIME_LONG;
***************
*** 474,481 ****
bufptr = 0;
while (bytes_to_send > 0 && attempts != RETRYMAX) {
attempts = 0;
! sprintf(scrstr2,"%s: Sending Block: %4d Bytes: %d",
! use_crc?"XmodemCRC":"Xmodem", sectnum, sectnum*SECSIZ);
size = SECSIZ <= bytes_to_send ? SECSIZ : bytes_to_send;
bytes_to_send -= size;
do {
--- 491,499 ----
bufptr = 0;
while (bytes_to_send > 0 && attempts != RETRYMAX) {
attempts = 0;
! sprintf(scrstr2,"%s: Sending Block: %4d Bytes: %ld",
! use_crc?"XmodemCRC":"Xmodem", sectnum,
! ((long)sectnum)*SECSIZ);
size = SECSIZ <= bytes_to_send ? SECSIZ : bytes_to_send;
bytes_to_send -= size;
do {
***************
*** 514,521 ****
} while ((c != ACK) && (attempts != RETRYMAX));
bufptr += size;
bytes_xferred += size;
- /* sprintf(scrstr2,"Sent block %4d",sectnum);
- InfoMsgNoScroll(scrstr2); */
sectnum++;
}
}
--- 532,537 ----
***************
*** 556,567 ****
int status;
char *p, *name_start;
timeout = USERABORT - 1;
for(p=name_start=name; !done && timeout != USERABORT; name_start=++p)
{
- if (*(name_start+1) == '\0')
- return;
-
while(*p == ' ') p++;
while(*p && *p != ',' && *p != ' ') p++;
if (*p == '\0') {
--- 572,581 ----
int status;
char *p, *name_start;
+ fd = -1;
timeout = USERABORT - 1;
for(p=name_start=name; !done && timeout != USERABORT; name_start=++p)
{
while(*p == ' ') p++;
while(*p && *p != ',' && *p != ' ') p++;
if (*p == '\0') {
***************
*** 573,579 ****
*p = '\0';
status = ((*mode)(name_start, multi));
! if (status == FALSE) close(fd);
}
server = 0;
multi = 0;
--- 587,593 ----
*p = '\0';
status = ((*mode)(name_start, multi));
! if (status == FALSE && fd >= 0) close(fd);
}
server = 0;
multi = 0;